package api.homework03;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class CollectAllDemo {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        c.add("1");
        c.add("2");
        c.add("3");
        c.add("4");
        c.add("5");

        System.out.println(c);
        Iterator it = c.iterator();
        while (it.hasNext()){
            String str = (String) it.next();
            System.out.println(str);
        }
    }
}
